from func_define import *
'''方案一：一次性5000鱼苗'''# 562061.756110169
def way_A(one_weight = 2.0,once = 5000,times = 3 ,days = 360):
    cost_all_day = 0
    cur_weight = once / 500.0 # 10kg，初始
    day = 1
    weight_all_way1 = [cur_weight]
    cost_all_way1 = [0]
    while day < 1+days:
        '''假设每天喂完过后，就直接增长重量'''
        # 当天的鱼的饲料的成本
        cost_all_day += food_cost_day(cur_weight)   # 当天weight鱼的花费
        cur_weight = 5000*weight(q,day)             # 5000条鱼，每条鱼第day天的重量
        cost_all_way1.append(food_cost_day(cur_weight))
        # 第二天的重量更新，长大了
        # print(cur_weight)
        weight_all_way1.append(cur_weight)
        day += 1

    print("池塘容量最高是",max(weight_all_way1))
    print("一共养殖天数",times*len(weight_all_way1))

    cost_all_way1 = cost_all_way1 * times
    weight_all_way1 = weight_all_way1 * times
    get_plot_show(range(len(weight_all_way1)),weight_all_way1,ylabel=r'当天池塘容纳重量/kg',label_name=None,
                  title=r'模型2池塘容纳重量随时间的变化')
    # get_plot_show(range(len(cost_all_way1)), cost_all_way1, ylabel=r'当天费用/元', label_name=None,
    #               title=r'方案二每日费用随时间的变化')

    print("总消耗",times*cost_all_day)
    one_year_money = once*get_money(one_weight)
    print("总收益",times*one_year_money)
    print("总利润",times*(one_year_money-cost_all_day))

way_A()
'''
总消耗 38673.989924376234
总收益 600000.0
总利润 561326.0100756238
'''
# way_A(1.92,int(10000/1.92),3,360)
'''
总消耗 9480.074611375774
总收益 599913.6
总利润 571473.3761658727
'''
